<include file="Common:header" />
<!-- /. NAV SIDE  -->
<include file="Common:left" />
<!-- /. NAV SIDE  -->
<div id="page-wrapper">
	<div class="header">
		<h1 class="page-header">
			账户管理 <small>Welcome {$Think.config.system_tag}</small>
		</h1>
		<ol class="breadcrumb">
			<li><a href="{:U('Index/index')}">首页</a></li>
			<li class="active">节点列表</li>
			<div style="float:right"><a href="#" onclick="openlayer('用户节点','{:U('member/addMemberNode')}')">添加节点</a></div>
		</ol> 
	</div>
	<div id="page-inner">
		<div class="row">
			<div class="col-xs-12">
				<!--Search content-->
				<!--Search content-->
				<!--Formlist content-->
				<div class="panel panel-default">
					<div class="panel-body">
						<div class="table-responsive">
							<table class="table table-hover">
								<thead>
									<tr>
										<th>节点名称</th>
										<th>节点中文名</th>
										<th>父级节点</th>
										<th>状态</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<volist name="list" id="vo">
										<tr>
											<td style="line-height:30px">{$vo.name}</td>
											<td style="line-height:30px">{$vo.title}</td>
											<td style="line-height:30px">{$vo.pid}</td>
											<td style="line-height:30px">
												<if condition="$vo['status'] eq 1">
													开启
												<else />
													关闭
												</if>
											</td>
											<td>
											<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-normal" onclick="openlayer('编辑','{:U('Member/editMemberNode',array('id'=>$vo['id']))}');return false;">编辑</a>
											<if condition="$vo['status'] eq 1">
												<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-danger" onclick="ajaxConfirm('确定要关闭吗?','{:U('Member/setMemberNode',array('id'=>$vo['id'],'status'=>0))}')">关闭</a>
											<else />
												<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-danger" onclick="ajaxConfirm('确定要开启吗?','{:U('Member/setMemberNode',array('id'=>$vo['id'],'status'=>1))}')">开启</a>
											</if>
											</td>
										</tr>
										<!--二层-->
										<notempty name="vo['slist']">
											<volist name="vo['slist']" id="sv">
												<tr>
													<td style="line-height:30px">├ {$sv.name}</td>
													<td style="line-height:30px">{$sv.title}</td>
													<td style="line-height:30px">{$sv.pid}</td>
													<td style="line-height:30px">
														<if condition="$sv['status'] eq 1">
															开启
														<else />
															关闭
														</if>
													</td>
													<td>
													<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-normal" onclick="openlayer('编辑','{:U('Member/editMemberNode',array('id'=>$sv['id']))}');return false;">编辑</a>
													<if condition="$sv['status'] eq 1">
														<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-danger" onclick="ajaxConfirm('确定要关闭吗?','{:U('Member/setMemberNode',array('id'=>$sv['id'],'status'=>0))}')">关闭</a>
													<else />
														<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-danger" onclick="ajaxConfirm('确定要开启吗?','{:U('Member/setMemberNode',array('id'=>$sv['id'],'status'=>1))}')">开启</a>
													</if>
													</td>
												</tr>
												<!--三层-->
												<notempty name="sv['sslist']">
													<volist name="sv['sslist']" id="ssv">
														<tr>
															<td style="line-height:30px">├ ├ {$ssv.name}</td>
															<td style="line-height:30px">{$ssv.title}</td>
															<td style="line-height:30px">{$ssv.pid}</td>
															<td style="line-height:30px">
																<if condition="$ssv['status'] eq 1">
																	开启
																<else />
																	关闭
																</if>
															</td>
															<td>
															<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-normal" onclick="openlayer('编辑','{:U('Member/editMemberNode',array('id'=>$ssv['id']))}');return false;">编辑</a>
															<if condition="$ssv['status'] eq 1">
																<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-danger" onclick="ajaxConfirm('确定要关闭吗?','{:U('Member/setMemberNode',array('id'=>$ssv['id'],'status'=>0))}')">关闭</a>
															<else />
																<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-danger" onclick="ajaxConfirm('确定要开启吗?','{:U('Member/setMemberNode',array('id'=>$ssv['id'],'status'=>1))}')">开启</a>
															</if>
															</td>
														</tr>
													</volist>
												</notempty>
												<!--三层-->
											</volist>
										</notempty>
										<!--二层-->
									</volist>
								</tbody>
							</table>
							{$page}
						</div>
					</div>
				</div>
				<!--Formlist content-->
			</div>
		</div>
	</div>
	<include file="Common:foot" />
	<script>
		layui.use('form', function(){
		  var form = layui.form;
		});
	</script>
	 <!-- /. PAGE INNER  -->
</div>
<include file="Common:footer" />
    